Magnetic flexible catheter tracking system and method using digital magnetometers

ABSTRACT

A method for magnetic tracking of a flexible catheter device or another flexible elongated device, the method comprising: receiving by a host server a plurality of sensed values of a local magnetic field, sensed by a respective plurality of sensors, wherein the host server is optionally included in a controller of the sensors, the sensors are located along a flexible tube of a device, wherein the sensed values are at least partially due to at least one alternating magnetic field generated by at least one magnetic field generator, the source amplitude and frequency of each generated magnetic field are given to the host server; and calculating by the host server, based On the sensed magnetic field values and the given source amplitude and frequency of each generated magnetic field, a localization of the flexible tube.

BACKGROUND

Known Electromagnetic (EM) localization systems are sometimes used inthe Medical field for tracking a small catheter inside the body. Thereason EM systems are highly suitable for such applications, is becausethe body is transparent to EM near-fields. This allows for a catheter orany other tool to be tracked in real-time inside (or outside) the bodywithout, the need for a line-of-sight and without the use of anypotentially harmful imaging modalities such as X-ray or ComputedTomography (CT).

Some known system may include an EM field sensor/receiver and an EMfield generator/transmitter that transmits multiple differentalternating (“AC”) EM fields, for example sinusoidal EM fields. Thereceiver usually receives a combination of the multiple EM fields fromthe transmitter, and differentiates between the different fields, forexample by performing a Fast Fourier Transform (FFT) and/or a DiscreteFourier Transform (DFT) or any other suitable method. By analyzing thephases and/or amplitudes, the receiver identifies a unique EM signatureassociated with a specific position and orientation, e.g. a specificsix-degrees-of-freedom (6DOF) state, for example three coordinates ofposition and three angles of orientation. In other systems the EMsignature is used to recover only five-degrees-of-freedom (5DOF). Inthese systems the roll angle of the sensor is usually absent. In othersystems only the position may be solved (3DOF) and the orientation ofthe sensor remains unknown.

Iii order o enable decomposition of the received combination of fieldsand/or distinguishing between the received fields and identification ofa unique 6DOF (or 5DOF) state of the monitored object, the transmitterneeds to transmit multiple EM sinusoidal field signals in carefullychosen frequencies, for example so that the sinusoidal field signals areorthogonal to each other. Some systems may include N transmitting coilswhich generate EM fields of different geometry. The number N should belarge enough to enable identification of the 6DOF (or 5DOF) state of themonitored object. In other systems, there may be a smaller number ofcoils that generate orthogonal (at the source) and/or otherwise highlydistinctive EM field signals. In order to ease the separation betweenthe fields, and increase the operation rate of the system, the systemmay usually use high-frequency EM fields, in the kHz scale.

In a traditional EM-tracked catheter setting, a catheter would have oneor more micro coils placed at its tip. For example, three micro-sizedcoils need to be placed at the tip of the catheter, traditionally in anorthogonal manner, and wires need to be pulled outside to an externalDSP. In some specialized systems a single coil is used rather than threeorthogonal coils, but this requires a specialized EM field generator togenerate many different unique fields, and in addition it can onlyprovide localization of up to five degrees-of-freedom (with roll anglemissing). In general, one-coil systems are inferior in terms of accuracyand overall stability. The EM field generator would generate ahigh-frequency (>1 kHz, for example) alternating magnetic field whichwould induce electromotive force (EMF) on the catheter's coils (byFaraday's law of induction). The coils are connected through wires to anexternal digital signal processor (DSP) unit which is responsible foramplifying the induced voltage, then sampling it, for example by usingan analog-to-digital (A2D) converter. A dedicated processor would thenanalyze the sensed signal, decompose it using FFT or DFFT (or any othersuitable method) into separate sine wave amplitudes and pass the DFTresults to another processing stage which is responsible for translatingthe computed field amplitudes into a position and orientation of thesensor in three-dimensional space, relative to the field generator.

The DSP unit should contain high-quality low-noise amplifiers in orderto be able to enhance the tiny voltages which are picked up on the microcoils for the A2D converter to be able to sample them with good SNR(Signal-Noise Ratio). Every such coil requires a separate processingchannel with a dedicated high-quality amplifier and A2D input. Inaddition, good signal-noise ratio (SNR) is hard to maintain; the tiniestnoise might be amplified and obscure the signal of interest. Forexample, the wires connecting the coils to the DSP might form a loopthrough which some magnetic flux flows and which therefore picks up someamount of parasitic, undesired signal from the transmitted fields. Thisrequires the wires to be wound across the catheter in a twisted pairfashion. In addition to the wires, the connector which connects thecatheter to the DSP might also form an undesired loop which is able topick up some amount of parasitic signal. A traditional EM cathetertherefore involves a complex design, with a special, complicated andexpensive, complementary DSP unit. The complexity of such system growsalmost linearly with the number of desired sensors (the number of coils,number of twisted-pair wires, number of DSP input channels which includemore expensive amplifiers and A2D). For all these reasons, one shouldappreciate why constructing a traditional EM catheter with more thanjust a very few EM sensors is virtually impractical.

Some devices such as mobile phones include an Inertial Measurement Unit(IMU) that provides information of the device's motion and pose.Usually, the IMU includes digital sensors such as a 3-axis accelerometerand a 3-axis gyroscope, and in many cases it also includes a 3-axismagnetometer. The accelerometer senses accelerations in local 3Dcoordinates. In a normal setting the accelerometer mainly senses thegravity force vector (plus some local, linear acceleration which can befiltered out using various sensor-fusion methods) and therefore mayenable detection of partial orientation, for example of the device'sscreen (landscape/portrait.). The gyroscope senses angular velocity ofthe device. In many applications, the data received from theaccelerometer and the gyroscope are combined to provide robustorientation tracking of the device. Since these two sensors have noreference except for the gravity force (which points to the sky), theorientation computed from the accelerometer and the gyroscope usuallydrifts slowly around the gravity vector. In this sense, orientationtracking based on accelerometer and gyroscope alone is considered“drifting”, since it has no stable reference. The magnetometer may beused to sense the DC Earth's magnetic field, for example using Halleffect sensors, magneto-resistive sensors, magneto-inductive sensors,and/or by any other suitable sensor type. The sensed DC Earth's magneticfield may be used to correct drifting of the accelerometer and gyroscopeorientation detection in Earth coordinates. However, the magnetometerreadings are often distorted by various elements in its environment,such as nearby metals (soft-iron, hard-iron distortion). In addition,low-cost magnetometer sensors are prone to bias calibration problems,where the internal bias of the sensor drifts over time. Therefore, inmany applications the magnetometer data is ignored and orientation isdetected by the accelerometer and gyroscope only, although theidentified orientation usually drifts over time with respect to Earth'sNorth, since the magnetometer data is dismissed and no other sensor isused as an additional reference for orientation. While the IMU is mostlyused for orientation detection, it may also be used for relativepositioning. Using sensor fusion methods, the local acceleration may beextracted from the accelerometer readings (subtracting the gravityforce). It can be then integrated over short time periods to compute thevelocity of the device. Double integration gives relative position ofthe device. These methods, however, are highly sensitive to bias noiseand are therefore usually only used with high-end highly accurate IMUsensors or over very short time periods (for example, for motion gesturedetection). While the IMU can be used in a normal setting for computingabsolute orientation of a device relative to Earth's coordinates (byusing data from all 3 sensors: accelerometer, gyroscope andmagnetometer), none of the IMU readings provide any information ofdevice's position relative to any absolute reference. In order to usethe WU for accurate absolute positioning, some external reference mustbe added.

SUMMARY

An aspect of some embodiments of the present invention provides a methodfor magnetic tracking of a flexible catheter device or another flexibleelongated device, the method comprising: receiving by a host server aplurality of sensed values of a local magnetic field, sensed by arespective plurality of sensors, wherein the host server is optionallyincluded in a controller of the sensors, the sensors are located along aflexible tube of a device, wherein the sensed values are at leastpartially due to at least one alternating magnetic field generated by atleast one magnetic field generator, the source amplitude and frequencyof each generated magnetic field are given to the host server; andcalculating by the host server, based on the sensed magnetic fieldvalues and the given source amplitude and frequency of each generatedmagnetic field, a localization of the flexible tube.

Optionally, the method includes receiving by a host server, from atleast one generator of an alternating magnetic field, a momentary phasevalue of the generated magnetic field; associating by the host serverbetween the momentary phase value and at least some of the sensedmagnetic field values received from the sensors; and calculating by thehost server, based on the magnetic field values and the associated phasevalue, a localization of the flexible tube.

Optionally, the associating is based on a corresponding clock readingshared or synchronized among the magnetic field generator, thecontroller of the sensors and the host server.

Optionally; the phase data is received from the at least one generatorin full rate of a magnetometer located at the at least one generator.

Optionally, the clock reading is shared by the magnetic field generatoror by a clock source shared among the field generator, a controller ofthe sensors and the host server.

Optionally, the method includes receiving from the at least onegenerator an amplitude value of the generated magnetic field at thesource.

Optionally, the calculating includes calculation of position andorientation of each of the plurality of sensors.

Optionally, the calculating includes using an Extended Kalman filter forfusing sensor data and imposing a motion model or shape constraints onthe calculations.

Optionally, wherein at least one of the sensors is a sensor bundle, andthe calculation incorporates accelerometer or gyroscope readings ofcorresponding sensors included in the sensor bundle.

Optionally, the calculation incorporates known structural relationshipsbetween the sensors to calculate an estimation of the position,orientation or curve of the tube as a whole.

Optionally, the sensed values are at least partially due to at least twogenerated magnetic fields generated by at least two correspondinggenerators.

Optionally, the at least two generated magnetic fields operate atdifferent frequencies.

Optionally; the at least two generators share the same clock or havesynchronized clocks or share a clock source.

Another aspect of some embodiments of the present invention provides asystem for magnetic tracking of a flexible catheter device or anotherflexible elongated device, the system comprising: at least onegenerator, each configured to generate an alternating magnetic fieldwherein each generated magnetic field has a determined source amplitudeand frequency; a device comprising: a flexible tube; a plurality ofsensors, the sensors are located along the flexible tube, eachconfigured to communicate sensed values of a local magnetic field,wherein the sensed values are at least partially due to the generatedmagnetic field; and a host server configured to: receive the sensedlocal magnetic field values from the corresponding sensors; andcalculate, based on the magnetic field values and the determined sourceamplitude and frequency, a localization of the flexible tube, whereinthe host server is optionally included in a controller of the sensors.

Optionally, the host server is configured to receive, from at least onegenerator of an alternating magnetic field, a momentary phase value ofthe generated magnetic field; associate by the host server between themomentary phase value and at least some of the sensed magnetic fieldvalues received from the sensors; and calculate by the host server,based on the magnetic field values and the associated phase value, alocalization of the flexible tube.

Optionally, the associating is based on a corresponding clock sourcereading shared among the magnetic field generator, a controller of thesensors and the host server.

Optionally, the device further comprises a flexible PCB along the tube,wherein the sensors are located along the flexible PCB.

Optionally, the flexible PCB is wrapped in a helix manner on a wall ofthe tube.

Optionally, the device further comprises a communication bus configuredto carry the sensed values data digitally from the plurality of sensorstowards the server.

Optionally, the communication bus includes up to four wire lines thatmay carry the sensed values digital data from and provide power to theplurality of sensors.

Optionally, the at least one generator comprises an internal clock andis configured to share its clock readings with the sensors and with thehost server.

Optionally, the at least one generator comprises a magnetometerconfigured to detect the phase data.

Optionally, at least one of the sensors is a sensor bundle comprisingaccelerometer or gyroscope sensors.

Optionally, the system includes at least two generators that generate atleast two respective magnetic fields that operate at differentfrequencies.

Optionally, the at least two generators share the same clock or havesynchronized clocks or share a clock source.

Optionally, the at least one generator comprises at least one permanentmagnet and a motor device that rotates the magnet in a determinedfrequency.

Optionally, the at least one generator comprises an electromagnetic coilthat generates a sinusoidal electromagnetic field at a specific knownfrequency.

Optionally, the device includes a plurality of dipole magnets positionedbetween the sensors.

Optionally, the dipole magnets are positioned in equal distances andoriented so that two magnets located at two sides of a sensor haveopposite dipole directions, when the tube is in a straight state.

BRIEF DESCRIPTION OF THE DRAWINGS

Some non-limiting exemplary embodiments or features of the disclosedsubject matter are illustrated in the following drawings.

In the drawings:

FIG. 1 is a schematic illustration of a catheter tracking system fortracking by digital magnetometers, according to some embodiments of thepresent disclosure;

FIG. 2 is a schematic illustration of an exemplary magnetic fieldgenerator/transmitter for tracking by digital magnetometers, accordingto some exemplary embodiments of the present disclosure;

FIG. 3 is a schematic flowchart illustrating a method for tracking bydigital magnetometers according to some embodiments of the presentdisclosure;

FIG. 4 is a schematic illustration of a catheter according to someembodiments of the present disclosure;

FIG. 5 is a schematic illustration of a catheter device, according tosome other embodiments of the present disclosure; and

FIG. 6 is a schematic illustration of a catheter device, according tosome other embodiments of the present disclosure.

With specific reference now to the drawings in detail, it is stressedthat the particulars shown are by way of example and for purposes ofillustrative discussion of embodiments of the disclosure. In thisregard, the description taken with the drawings makes apparent to thoseskilled in the art how embodiments of the disclosure may be practiced.

identical or duplicate or equivalent or similar structures, elements, orparts that appear in one or more drawings are generally labeled with thesame reference numeral, optionally with an additional letter or lettersto distinguish between similar entities or variants of entities, and maynot be repeatedly labeled and/or described. References to previouslypresented elements are implied without necessarily further citing thedrawing or description in which they appear.

Dimensions of components and features shown in the figures are chosenfor convenience or clarity of presentation and are not necessarily shownto scale or true perspective. For convenience or clarity, some elementsor structures are not shown or shown only partially and/or withdifferent perspective or from different point of views.

DETAILED DESCRIPTION

Before explaining at least one embodiment of the disclosure in detail,it is to be understood that the disclosure is not necessarily limited inits application to the details of construction and the arrangement ofthe components and/or methods set forth in the following descriptionand/or illustrated in the drawings and/or the Examples. The disclosureis capable of other embodiments or of being practiced or carried out invarious ways.

Some embodiments of the present disclosure provide a magnetic full-curvecatheter tracking system. A magnetic field generator/transmitteraccording to some embodiments of the present disclosure may induceelectromagnetic field on a plurality of magnetometers placed along aflexible catheter tube. In some embodiments, the provided system mayinclude at least one special magnetic field generator and/or use aspecial magnetic field generation and/or transmission method. A magneticfield generator/transmitter provided according to some embodiments ofthe present invention may consist of low-cost components.

The provided system may receive sensor readings of local electromagneticfield values from the plurality of magnetometers, and based on thereceived readings calculate a full-curve localization of the cathetertube along its length. This is in contrast to traditional EM cathetertracking systems in which, usually, only the catheter tip is tracked. Insome embodiments, the provided system may calculate and/or identify 6DOFlocalization, e.g. three-dimensional position and orientation, of eachmagnetometer based on its magnetic sensor reading, relative to themagnetic field generator(s). In some embodiments, the sensing radius ofthe magnetometers is up to about 50 centimeters. Accordingly, in someembodiments, the distance of the at least one magnetic field generatorfrom the plurality of magnetometers is up to 50 centimeters.

According to some embodiments, the provided system includes a pluralityof digital magnetometers, for example off-the-shelf magnetic sensors,for example similar to or the same magnetometers included in IMUs. Insome embodiments, full IMU sensor bundles are used. The digitalmagnetometers may have a small footprint and/or size, suitable forcatheters for insertion into various body cavities. For example, themagnetometers are insertable to a catheter tube and/or to a body cavityand/or on the catheter tube wall. For example, the plurality ofmagnetometers may be placed, for example in an integrated circuit and/orsilicon die, on a flexible printed circuit board (PCB) along thecatheter tube. The plurality of magnetometers may be packaged, forexample in an Ultra-Small Wafer Level BGA (Ball grid array) package.This may allow for placing them on a very thin flexible PCB.

A magnetometer, as referred to throughout the present description,usually operates at a sampling rate of an order of magnitude of hundredsof Hz, for example of about 100 Hz and/or up to 500 Hz-1000 Hz. In orderto use a direct-current (DC) magnetometer (one that measures DC magneticfields) as an alternate-current (AC) magnetic sensor (one that isintended for use with AC magnetic fields), the sensed AC magnetic fieldmay be of a frequency significantly smaller than the magnetometer'ssampling rate, e.g. an order of magnitude smaller. The sensed magneticfields should be in a range detectable by the DC magnetometer. Forexample, the sensed magnetic field should be about ten times themagnetometer's sensitivity when generated, and take into account alsothe noise level, in order to be detected by the magnetometer. Forexample, a DC magnetometer can detect magnetic fields of between a fewμT to a few thousands of μT (For example, between 1 to 400 μT) withsensitivity, e.g. resolution, of about 0.1 μT. Since a magnetic field'sstrength is inversely proportional to the cube of the distance betweenthe dipole source and the receiver, the sensing range should have afactor ˜10 between the minimal to the maximal distances, for example 10cm to 1 m or 1 m to 10 m, etc.

According to some embodiments, the plurality of magnetometers are placedalong and transmit the sensed values by a same data bus, requiring, forexample, as few as four or less electrical wires pulled along thecatheter tube, no matter how many magnetometers are placed along and/ortransmitting the data by the data bus. This is in contrast totraditional analog catheter tracking systems, that may require a numberof wires that grows linearly with the number of magnetic sensors.

Some embodiments of the present disclosure provide a method forlocalization calculation that may calculate the full-curve localizationof the catheter curve in a rate greater than 30 Hz. This rate issuitable for most real-time medical applications. Therefore, someembodiments of the present invention provide a solution to the problemof acquiring real-time full-curve localization of a small-diametercatheter, without the high costs of traditional EM sensors and DSPs.Additionally, in some embodiments the provided system has low powerconsumption, for example both on the receiving and the transmitting end,which may allow for a wireless and/or battery operated full-curvecatheter localization system of a significantly small footprint.

The ability to construct a full curve tracked catheter at low costs anduncomplicated configuration, as provided by some embodiments of thepresent disclosure, is important for many potential medicalapplications.

Reference is now made to FIG. 1 , which is a schematic illustration of acatheter tracking system 100 for racking by digital magnetometers,according to some embodiments of the present disclosure. According tosome embodiments of the present disclosure, system 100 provide asolution for full-curve catheter localization. System 100 may include acatheter 30, a hardware host server 10 and at least one magnetic fieldgenerator/transmitter 20, for example, magnetic fieldgenerators/transmitters 20 a and 20 b. As described herein, system 100may provide a full curve localization of catheter 30 to its length. Insome embodiments of the present disclosure host server 10 is included ina controller in catheter 30, e.g. all the functionalities of host server10 described herein are performed by a controller in catheter 30. Theterms controller and microcontroller are sometimes used interchangeablythroughout the present disclosure and may also mean or include amicroprocessor.

Transmitter 20 may generate a magnetic field. For example, transmitter20 is an electromagnetic generator of magnetic fields, for exampleincluding at least one electromagnetic coil. Each generator 20 maygenerate an alternating magnetic field. Each generated magnetic fieldhas a determined source amplitude and frequency. In some embodiments,transmitter 20 may include a sensor that senses a momentary phase of thegenerated EM field or computes the momentary phase of the generated EMfield by using a synchronized EM field generator driver and communicatesto host server 10, for example, periodically, the momentary phase valuealong with a timestamp.

In some embodiments of the present disclosure, transmitter 20 mayinclude at least one rotating magnet, as shown in more detail in FIG. 2. As described in more detail herein, in some embodiments, transmitter20 may include a sensor that senses a momentary phase of the rotatingmagnet or computes the momentary phase of the rotating magnet by using asynchronized motor driver and communicates to host server 10, forexample, periodically, the momentary phase value along with a timestamp.

Catheter 30 may include a microcontroller 32, a flexible tube 36 and aplurality of magnetometer sensors 31, for example implemented upon aflexible PCB (shown in more detail in FIG. 4 ) along tube 36.Magnetometer sensors 31 may be placed in predefined locations along tube36 and/or in predefined distances between them. According to someembodiments, magnetometer sensors 31 may be or include off-the-shelfmagnetic sensors, for example similar to or the same magnetometersincluded in IMUs or standalone off-the-shelf magnetic sensors. In someembodiments, each of magnetometer sensors 31 may be or include a fullIMU sensor bundle.

Each of magnetometer sensors 31 may sense a corresponding local magneticfield value resulting from the magnetic field generated by transmitter20. Host server 10/microcontroller 32 may receive the magnetic fieldvalue from sensors 31 and/or microcontroller 32 may communicate to hostserver 10/microcontroller 32 the sensed value along with a timestamp.Microcontroller 32 may be located at a proximal end of catheter 30, e.g.in a communication path between sensors 31 and host server 10. Forexample, microcontroller 32 may receive and/or gather at least one localand momentary magnetic field values from respective at least one sensor31, for example values sensed in a certain moment, and transmit thegathered values along with a corresponding timestamp, for example, overUSB, wireless communication, etc. For example, microcontroller 32 maycommunicate the gathered sensed values along with identification of therespective sensing sensors 31, for example for each sensed value. Asdescribed in more detail herein, sensors 31 may be communicationallyconnected by a same data bus 34 placed along tube 36, to microcontroller32 and/or to host server 10. In some embodiments of the presentdisclosure, at least some of the functionalities of host server 10described throughout the present description are performed bymicrocontroller 32. In some embodiments, all functionalities of hostserver 10 are performed by microcontroller 32 and/orprocessor/controller 27 described with reference to FIG. 2 .

Flexible tube 36 may be positioned in various positions and may havevarious momentary curve shapes, for example according to a shape of abody organ it is inserted into and/or according to obstacles thecatheter tube encounters.

Host server 10/microprocessor 32 may include at least one hardwareprocessor 12 and/or at least one hardware memory 14. Memory 14 mayinclude a tangible non-transitory processor readable storage medium,storing process readable program instructions thereon, for causingprocessor 12 to carry out aspects of the present disclosure. System 100may include a display de-vice 16, configured to receive data and/orinstructions from host server 10 and display information according tothe received data and/or instructions. Display device 16 may show, forexample, navigational instructions for instructing the physician toreach a certain point of interest inside the body.

Magnetometer sensors 31 may be and/or include digital magnetometersconfigured to provide sensor digital output, may be low-cost and/or mayhave a small footprint. In some embodiments, each of sensors 31 may beor include a standard IMU, which may include a magnetometer, anaccelerometer and/or a gyroscope. The plurality of sensors 31 may beplaced along a same digital communication bus 34 and/or communicate thesensor digital output by same digital communication bus 34 tomicrocontroller 32 and/or to server 10. For example, sensors 31 maysense along the curve of tube 36 local electromagnetic field valuessimultaneously or within a very short period of milliseconds, and/or maytransmit these values by the same bus 34 to microcontroller 32 and/or toserver 10, for example simultaneously or within a very short period ofup to a few milliseconds or a few tens of milliseconds. Host server10/microprocessor 32 may receive the sensed local magnetic field valuesfrom the corresponding sensors 31, and/or may calculate a localizationof flexible tube 36, for example based on the sensed magnetic fieldvalues and the determined source amplitude and frequency of the magneticfield generated by transmitter 20

Each sensor 31 may be identified separately by microcontroller 32 and/orserver 10. For example, microcontroller 32 and/or server 10 may relateeach received electromagnetic field value to the respective sensor 31that sensed this value. For example, microcontroller 32 may transmit thesensed value to server 10 along with an identifier code that identifiesthe sensor that sensed this value. In some embodiments, the sensed valueand/or identifier code is sent along with a timestamp which, forexample, attests to the reading time of the sample. As described in moredetail herein, host server 10/microprocessor 32 may calculate 6DOFlocalization of the respective sensor based on the received sensed valueand/or timestamp and/or the phase data received from at least onegenerator 20, and/or calculate a full-curve position of catheter tube 36based on the plurality, of sensed values received from the plurality ofsensors 31. For example, the calculation is made by imposing some shapeand/or curvature constraints. In some embodiments of the presentinvention, system 100 may include any suitable number of sensors 31along tube 36, for example with no substantial increase to thecomplexity of the system, for example since sensors 31 transmit thesensed values by the same data bus 34. For example, in some embodiments,no DSP input channels are required in order to amplify, sample andtransmit the magnetic values from sensors 31 to microcontroller 32and/or server 10.

In some embodiments, system 100 is synchronous, e.g. shares a singleclock between its components. For example, generator/transmitter 20 mayinclude an inner clock, and/or may share its clock readings with sensors31, microcontroller 32 and/or with server 10 and/or with othergenerator/transmitters, as described in more detail herein. In someembodiments of the present disclosure, at least some of the componentsof system 100 synchronize their respective clocks with an external clockMicrocontroller 32 may receive from sensors 31 their respective sensedvalues. For example, microcontroller 32 may receive via data bus 34 thesense data sampled by sensors 31 and written on data bus 34. In someembodiments, microcontroller 32 transmits the data to host 10, forexample along with a corresponding timestamp. For example, the timestampcorresponds to respective clock readings received from transmitter 20,or is based on another shared clock. Server 10 may receive the data fromtransmitter 20 and sensors 31 and/or synchronize the data according tothe timestamps. For example, the shared or external clock may include adedicated crystal oscillator physically connected to all devices, a USBhub clock shared among all devices connected to the USB hub, a clockgenerated by an RF (radio-frequency) main source and shared wirelesslyamong RF devices, or a (IPS clock, sensed by at least some devices insystem 100.

In some exemplary embodiments, transmitter 20 may use electromagneticcoils to generate low-frequency magnetic fields. The frequency may below enough (for example, lower than 500 Hz) to be fully matched by thesampling rate of sensors 31, e.g. sensors 31 may sample the magneticfields in at least a minimum rate required for retaining all therequired information, for example amplitude, frequency and/or phase,about the sensed magnetic field. The generated magnetic fields may bestrong enough within the sensing radius (for example, stronger than 1uT) to get quality samples, in magnetometer's sensitivity and/orsignal-to-ratio (“SNR”) sense. Sensor 31 may collect enough samples toperform discrete Fourier transform (“DFT”) or similar algorithms toseparate between the generated magnetic fields and solve for 6DOFlocalization of sensors 31 and/or tube 36. In some cases, in order toprovide low-latency, high-rate 6DOF solutions, phase information may beprovided by transmitter 20 and synced between transmitter 20 and sensor31 and/or microcontroller 32. This way, microcontroller 32 and/or hostserver 10 may be aware of a momentary phase of the generated magneticfield, and may be able to produce rapid 6DOF solutions by using thesynchronized phase information and timestamps in an extended Kalmanfilter setting (as explained herein).

As described in more detail herein, for example with reference to FIG. 2, according to some embodiments of the present invention, magnetic fieldgenerator/transmitter 20 includes a rotating magnet and a rotary sensor,e.g. a magnetometer, that senses the momentary phase of the magnetrotation, e.g. where the magnet is located in its rotational orbit in agiven moment. For example, the rotary sensor is configured tocommunicate to server 10 the momentary phase information, for examplealong with respective timestamps of the clock readings, for example infull rate.

For example, according to their matching timestamps, server 10 mayrelate a certain phase state of the generated magnetic field(s) tocorresponding local magnetic field readings received from sensors 31,which were sensed and/or transmitted at the same time as the phasereading. Based on the magnetic field readings and the related momentaryphase reading(s), server 10/microprocessor 32 may calculate thefull-curve catheter localization, for example in real time. For example,host server 10/microprocessor 32 may receive from at least one generator20 of an alternating magnetic field, a momentary phase value of thegenerated magnetic field, may associate between the momentary phasevalue and at least some of the sensed magnetic field values receivedfrom sensors 31, and/or may calculate, based on the magnetic fieldvalues and the associated phase value, a localization of flexible tube36.

It will be appreciated that system 100 may include a plurality ofcatheters 30, and that server 10 may calculate the full-curve catheterlocalizations for a plurality of catheters 30, for example concurrently.

Reference is now made to FIG. 2 , which is a schematic illustration ofan exemplary magnetic field generator/transmitter 20 for tracking bydigital magnetometers, according to some exemplary embodiments of thepresent disclosure. Generator/transmitter 20 may include at least onepermanent magnet 22, a processor/controller 27 having an inner clock 28and a communication interface 29, a motor device 21, a magnetometer 25,and a power source 24.

The configuration of generator/transmitter 20 as shown in FIG. 2 anddescribed herein is not required by some embodiments of the presentinvention, and other suitable configurations, components and/orstructures of generator/transmitter 20 are possible, according to someembodiments of the present invention.

In some embodiments, generator/transmitter 20 generates a low-frequencyelectromagnetic field of, for example, less than 60 Hz, having strengthof, for example, about 1 uT or stronger at, for example, about 1 meterfrom the transmitter. Usually, in order to produce such a strong fieldby an AC current according to Ampère's law, a very large transmitterwith very high-power consumption is required. However, according to someembodiments of the present invention, generator/transmitter 20 includesat least one permanent magnet 22 that generates the magnetic field. Byproducing the magnetic field by at least one permanent magnet, themagnetic field produced by generator/transmitter 20 may be about ahundred times stronger than a magnetic field produced by AC electriccurrent, by a transmitter of similar dimensions, and results in anextremely low-power transmitter. The material of the magnet is chosen tomaximize the generated magnetic field strength compared to the size ofgenerator/transmitter 20. For example, generator/transmitter 20 mayinclude a rare-Earth magnet, for example a Neodymium magnet or magnet ofanother suitable material.

In order to produce an AC magnetic field, in some embodiments of thepresent invention, magnet 22 is mounted on an axis rotated, for example,by a motor device 21, for example a direct-current (DC) motor, or byelectromagnetic coils wound around magnet 22 which produce a weak ACfield, strong enough to rotate the magnet at their center with theirapplied torque, or by off-the-shelf electromagnetic single-axis coilsplaced near magnet 22 which produce a weak AC field, strong enough torotate the magnet with their applied torque, or any other suitabledevice, at a desired operating frequency f. Thus, for example, rotatingmagnet 22 results in an AC magnetic field in the surrounding space. Themagnetic field generated by the rotating magnet 22 may be expressed asthe superposition of two AC magnetic fields of frequency f andorthogonal phases and generated by two separate virtual coils x and y:

B({right arrow over (r)}, t)=B _(x)({right arrow over (r)})cos(ϕ(t))+B_(y)({right arrow over (r)})sin(ϕ(t)

where ϕ(t) is the phase within the rotation of the magnet 22. In aperfect setting ϕ(t)=ωt, that is, the transmitter produces perfectlyfixed frequency ω=2πf, but in more practical scenarios this is just anapproximation which can be expressed as: ϕ(t)≈ω. B_(x) is the magneticdipole field due to the ‘x’ virtual coil and B_(y) is the magneticdipole field due to the ‘y’ virtual coil. In other words, B_(x), B_(y)are two magnetic fields corresponding to virtual ‘x’ and ‘y’ axes of therotating magnet 22, respectively. It will be appreciated that accordingto some embodiments of the present invention, magnet 22 may becontrolled to move according to other, for example more complicated,motion models. For example, magnet 22 may be rotated about atime-varying axis direction. For example, the movement of magnet 22 mayinclude a combination of rotational motion about a fixed axis and aperiodic linear motion parallel to the fixed axis. Other motion modelsare also in the scope of the present invention. In some embodiments, themore complicated motion models may add an additional orthogonal virtualcoil ‘z’ whose dipole field is denoted B_(z)({right arrow over (r)}) andthat may enhance the position and orientation calculations. This iswhile keeping the ability of magnetometer 25 to detect the momentaryposition, e.g. phases, of magnet 22.

in some embodiments, magnet 22 may be controlled by generator 20 torotate about an additional, secondary, axis, to obtain a more complexmagnetic field sensed by receiver 20 and thus, for example, provide moreinformation for the position and orientation calculation. Magnetometer25 may sense the corresponding generated magnetic fields and accordinglycalculate momentary phases of magnet 22, in the rotational motions aboutthe first axis and the secondary axis, and transmit the calculatedmomentary phases to receiver 20. For example, the cyclic motion ofmagnet 22 is produced by mounting magnet 22 and/or a first motor on acamshaft of a second motor. For example, the cyclic motion about thefirst and second axes is applied to magnet 22 by mounting magnet 22 on ashaft, the shaft is free to rotate and move axially and includes aradial pin engaged in a groove in a surrounding sleeve. Optionally, thegroove is in the shaft and the pin extends from the sleeve radially intothe groove.

Processor/controller 27, for example a microcontroller/controller, maymaintain a permanent desired frequency f, in which motor 21 operatesand/or magnet 22 rotates. For example, a desired frequency f is inherentto and/or embedded in the hardware of controller 27 and/or transmitter20. For example, motor device 21 may be a highly stable motor and/or ora specially designed motor, for example, operating according to a clock28 of controller 27, or otherwise maintaining a substantially constantfrequency. In some embodiments, controller 27 may switch between variouspossible frequencies to maintain, for example by maintainingcorresponding voltage levels provided to motor 21, in a closed feedbackloop with the transmitter's magnetometer 25 (rotary sensor), causingtransmitter 20 to generate AC field in a desired maintained frequency f.In some embodiments, controller 27 may include hardware and/or softwarecomponents to change the frequency f. The maintained frequency f may becommunicated to receiver/sensor 20, for example by, controller 27, forexample by communication interface 29. Communication interface 29 mayinclude a low-power radio transmitter/receiver, for example a 2.4 GHztransmitter/receiver, and/or a Low-Energy Bluetooth device, a WiFicommunication device, a USB cable, or any other suitable communicationdevice.

According to some embodiments of the present invention, magnetometer 25may be located at a fixed location relative to rotating magnet 22.Magnetometer 25 may sense the rotation periods of magnet 22 and where inthe period magnet 22 is located, e.g. the momentary rotational phaseϕ(t) of magnet 22. As indicated in more detail herein, the rotationalphase of magnet 22 may include one or two rotation phases aboutcorresponding one or two axes. For example, magnetometer 25 may providean estimation of the phase of magnet 22, for example by principlecomponent analysis (PCA) of magnetic samples collected over manyrotation periods, for example to extract the axes of an ellipse drawn ina local coordinate system centered at transmitter 20 by rotating magnet22, or any other suitable method for detecting the phase of magnet 22,for example, by fitting an ellipse to samples collected over manyperiods of the rotating magnet by means of optimization. According tosome embodiments of the present invention, magnetometer 25 is placed atand/or on the rotation axis of the rotating magnet. Due to symmetry, thesensed magnetic field forms an approximate circle or ellipse at thelocation of magnetometer 25 while the magnet is rotating. The formedellipse/circle may be identified, for example by server10/microcontroller 32. For example, an ellipse/circle may be fitted tothe periodic curve shape of the sensed magnetic field, for example byhost server 10/microprocessor 32. For example, server 10/microprocessor32 may approximate the periodic curve shape of the sensed magnetic fieldto a circle and/or compute the momentary phase state of the generatedmagnetic field within this circle.

The rotation frequency of the magnet 22 may be significantly lowerrelative to the sampling rate of magnetometer 25, e.g. a sampling ratein the range of about 100 Hz-1000 Hz, for example so that the rotationphase of magnet 22 can be estimated more accurately. Therefore, in someembodiments of the present invention, the rotation frequency of magnet22 is much lower than the sampling rate of magnetometer 25, for examplean order of magnitude lower, for example up to about 10 Hz-100 Hz,according to the sampling rate of magnetometer 25. Accordingly,processor/controller 27 may calculate the rotation phase of magnet 22and/or communicate the calculated phase to receiver server 10, forexample by interface 29. Magnetometer 25 may, in some embodiments, beincluded in a sensor bundle, for example an IMU chip.

According to some embodiments of the present disclosure, unliketraditional magnetic/electromagnetic field transmitter units,transmitter 20 may generate the magnetic field without using electriccurrent to induce magnetic field. Transmitter 20 utilizes the alreadyexisting field generated by permanent magnet 22. Therefore, the powerconsumption of transmitter 20 is much lower compared to traditionaltransmitter units, the lower consumption allows it to operate, forexample, tens of hours on a few standard batteries. Thus, for example,power source 24 that may provide power o transmitter 10 may be alow-power source such as disposable and/or rechargeable batteries and/orany other suitable low-power source. Rotating the magnet either using astandard DC motor or by weak AC fields produced by coils at theproximity of the magnet, which apply torque on the magnet and cause itto rotate, consumes much less power than generating the same AC fieldusing a standard EM transmitter.

Reference is now made to FIG. 3 , which is a schematic flowchartillustrating a method 300 for tracking by digital magnetometersaccording to some embodiments of the present disclosure. As indicated inblock 310, server 10 may receive from generator/transmitter 20 dataabout a momentary phase of a generated alternating magnetic field, forexample a momentary rotation phase of permanent magnet 22, for examplealong with a corresponding clock reading of clock 28. For example,server 10 may receive the phase data from generator/transmitter 20 inpredetermined periods and/or each time magnetometer 25 detects a phaseof the generated alternating magnetic field. Additionally, server 10 mayreceive and/or extract the amplitude and/or of the generated magneticfield at the source, i.e. at transmitter 20, for example frommagnetometer 25 and/or by pre-defined calibration data stored in server10.

As indicated in block 320, server 10 may receive a sensed value of localmagnetic field, sensed by at least one of sensors 31 along flexible tube36 that senses the magnetic field generated by generator/transmitter 20.Since sensor 31 senses the generated magnetic field in its localcoordinate system, the magnetic field reading is rotated according toits orientation with respect to generator/transmitter 20, yielding, forexample, the following magnetic field measurement by sensor 31:

M _(RX)(t)=R ^(t)(t)M(t)+M ₀

Where R is a 3×3 matrix, representing the orientation of sensor 31 incoordinates of generator/transmitter 20, M₀ is a sensor bias of sensor31, and M(t) is the generated magnetic field, for example plusenvironmental magnetic field at the location of sensor 31, incoordinates of the generator/transmitter 20.

In case of a single generator/transmitter 20 included in system 100, insonic embodiments of the present invention, the local magnetic field atthe location of one of sensors 31 can be expressed as the superpositionof two AC magnetic fields of frequency f and orthogonal phases andgenerated by two separate virtual coils x and y of transmitter 20:

M(t)=B ₀ +B _(x)({right arrow over (r)}(t))cos(ϕ(t))+B _(y)({right arrowover (r)}(t))sin(ϕ(t))

Where B₀ is environmental magnetic field (e.g. Earth's magnetic field),B_(x), B_(y) are the magnetic fields due to the virtual coils ofgenerator/transmitter 20, {right arrow over (r)}(t) is the position attime t of sensor 31 and ϕ(t) is the sensed phase ofgenerator/transmitter 20 at time t (sensed, for example by magnetometer25). Accordingly, the sensed magnetic field M_(RX)(t) conveys and/orenables extraction, for example by server 10, of the position andorientation of sensor 31, wherein the phase ϕ(t) is received fromgenerator/transmitter 20, and wherein time t is the shared reading ofclock 28 or of an external clock source shared among at least some ofthe components of system 100.

As indicated in block 330, server 10 may associate between a sensedmomentary phase of magnet 22, sensed and/or communicated by magnetometer25 and/or generator/transmitter 20, and sensed magnetic field valuesreceived from sensors 31, based on the corresponding shared clockreading of clock 28 or of an external clock source shared betweencomponents of system 100, such as server 10 and sensors 31 and/ormicrocontroller 32,

As indicated in block 340, server 10 may calculate, based on thereceived sensed magnetic field values and the associated phase of magnet22, position and orientation of sensors 31 that provided a sensedmagnetic field value, for example the 6DOF or 5DOF localization of eachof sensors 31 and/or an overall position, orientation and/or curve oftube 36. According to some embodiments, server 10 may use for thelocalization calculations accelerometer and/or gyroscope readings ofcorresponding sensors included in sensors 31, in some embodiments of thepresent disclosure.

According to some embodiments of the present disclosure, sensors 31 arerequired to have minimal size and thus, for example, may not includegyroscope and/or accelerometer and/or other additional sensors. In suchcases, system 100 may include more than one generators/transmitters 20,for example generators/transmitters 20 a and 20 b, for example in orderto enable a more accurate calculation of 6DOF or 5DOF localizations.

Generators/transmitters 20 a and 20 b may both generate alternatingmagnetic fields, for example in different frequencies (which are notnecessarily orthogonal). Generators/transmitters 20 a and 20 b may belocated in a fixed position and orientation relative to each other,and/or the relative position and/or orientation ofgenerators/transmitters 20 a and 20 b may be computed and/or adjusted,for example by manual and/or computerized calibration.

Similarly to a single generator/transmitter 20, generators/transmitters20 a and 20 b may generate magnetic fields M₁(t) and M₂(t),respectively, that may be expressed by:

M ₁(t)=B _(x1)({right arrow over (r)} ₁(t))cos(ϕ₁(t))+B _(y1)({rightarrow over (r)} ₁(t))sin(ϕ₁(t))

M ₂(t)=B _(x2)({right arrow over (r)} ₂(t))cos(ϕ₂(t))+B _(y2)({rightarrow over (r)} ₂(t))sin(ϕ₂(t))

Wherein {right arrow over (r)}₁(t), {right arrow over (r)}₂(t) are theposition of sensor 31 in coordinates of transmitter 20 a and 20 b,respectively, ϕ₁(t), ϕ₂(t) are the phases tracked by magnetometers 25 oftransmitter 20 a and 20 b, respectively, B_(x1), B_(y1) are magneticfields due to virtual coils of transmitter 20 a, and B_(x2), and B_(y2)are magnetic fields due to virtual coils of transmitter 20 b.Generators/transmitters 20 a and 20 b may share the same clock and/orhave synchronized clocks.

The magnetic field sensed by sensor 31 may be expressed by:

M _(RX) ^((DUAL))(t)=M ₀ +R ₁ ^(t)(t)B ₀ +R ₁ ^(t)(t)M ₁(t)+R ₂ ^(t)(t)M₂(t)

Where R₁ and R₂ are 3×3 matrices, representing the orientation of sensor31 in coordinates of generator/transmitter 20 a and 20 b, respectively,B₀ is the environmental magnetic field (e.g. Earth's magnetic field) andM₀ is a sensor bias of sensor 31. Since the positions ofgenerators/transmitters 20 a and 20 b are fixed with respect to eachother, R₂ and/or {right arrow over (r)}₂ can be easily derived from R₁and/or {right arrow over (r)}₁, or vice versa, for example, by thesimple relation:

T ₁₂ ·[R ₁ ;r ₁ ]=[R ₂ ;r ₂]

where T₁₂ is a known rigid transform which converts the coordinates oftransmitter 20 a to the coordinates of transmitter 20 b, or vice versa.Therefore, when system 100 includes two generators/transmitters 20 a and20 b, there may be no need for solving corresponding two relativepositions and two relative orientations for each sensor 31. It maysuffice to solve position and orientation relative to a firsttransmitter, which may be converted to the second transmitter'scoordinate system. Hence, server 10 may calculate the 6DOF position andorientation of sensor 31 based on the received sensed magnetic fieldM_(RX) ^((DUAL)) and the sensed magnetic field phases and clock readingsreceived from generators/transmitters 20 a and 20 b, for example be acatheter localization algorithm implemented in server 10/microcontroller32.

It will be appreciated that the solution for the 6DOF localization ofsensors 31 and/or tube 36 is flexible enough and does not rely on anyspecific implementation, structure and/or configuration of transmitters20, as long as the momentary generated magnetic field at variouslocations in space is known. In a general setting, the magnetic fieldreading by a sensor 31 can be described as:

M _(RX)(t)=M ₀ +R ^(t)(t)B ₀ +R ^(t)(t)M({right arrow over (r)},t)

where M({right arrow over (r)},t) is the known generated magnetic fieldin coordinates of the generator transmitter 20 at point {right arrowover (r)} and time t. For example, M({right arrow over (r)},t) can bemodeled as the superposition of general sinusoidal electromagnetic coilfields with different frequencies, for example:

${M( {\overset{arrow}{r},t} )} = {\sum\limits_{i}{{B_{i}( \overset{arrow}{r} )}\sin( {2\pi f_{i}t} )}}$

where B_(i)({right arrow over (r)}) is the magnetic field due to thei-th electromagnetic coil and f_(i) is the operating frequency of thei-th EM coil.

In some embodiments of the present disclosure, Kalman filter may be usedto track a position and/or orientation state of sensor 31. By usingKalman filter algorithm, a faster refresh rate for updating the detectedstate of sensor 31 and better overall tracking performance may beobtained. It will be appreciated that in a low-frequencymagnetometer-based localization system, in which the sampling rate ofsensor 31 may be, for example, between 100 Hz-1000 Hz, the magneticfield frequency of transmitter 20 may be constrained to about 10-100 Hz.In this case, a localization algorithm which relies on the decompositionof full periods of the sine waves to field amplitudes, is doomed to havea slow refresh rate and inferior overall tracking performance, which isunacceptable for most medical applications. In some embodiments of thepresent disclosure, server 10 solves the problem of slow refresh rate byusing a Kalman filter algorithm incorporated in its catheterlocalization algorithm, which may yield, in some embodiments, a refreshrate of at least 100 Hz, fast enough for most medical applications.

Server 10 may use a mathematical model to describe motion of cathetertube 36. In some embodiments, server 10 may track each sensor 31independently. For example, server 10 may predict the state of sensor 31of a next timeframe, for example based on the state in a currenttimeframe, and/or based on IMU sensor bundle measurements that may beused to correct the prediction. For example, a motion model may use aconstant and/or damped velocity for a position and/or orientation ofsensor 31. For example, server 10 may use for a Kalman filter algorithma state vector for sensor 31. The state vector may be composed ofparameters such as, for example, M₀, B₀, {right arrow over (r)}, Q,{right arrow over ({dot over (r)})}, {right arrow over (ω)}, which maybe the sensor bias, environmental magnetic bias, position in coordinatesof transmitter 20/20 a, orientation in coordinates of transmitter 20/20a (expressed as a quaternion), velocity in coordinates of transmitter20/20 a, angular-velocity in local coordinates (not to be confused withthe frequency of the transmitted magnetic field, also sometimes denotedby ω), respectively. M₀, B₀ may vary slow enough to be modeled asconstant or nearly constant. Deviation from constant velocities, e.g.existence of linear and angular accelerations, and/or deviation fromconstant environmental magnetic field and sensor bias, can be modeled,for example, as process noise, with corresponding covariance matrices.

After defining the state vector and its dynamic model, server 10 maypredict a state vector of sensor 31 and/or state covariance betweenconsecutive timeframes. Then, the state vector may be correctedaccording to the prediction to yield a better fit to the newly obtainedsensor magnetic field reading. For example, the tracked state vector,whose magnetic measurement is modeled as M_(RX) ^((DUAL))(t), may yielda vector which deviates from the latest sensed magnetic reading only bya small amount of random noise, whose standard deviation can be setaccording to its typical value, for example from a datasheet of therespective magnetometer.

In some embodiments, the motion model used by server 10 is modularand/or extendable. For example, with the presence of optionalaccelerometer or gyroscope sensors, for example in sensor 31, the Kalmanfilter can be extended to include an additional state for linearacceleration, {right arrow over ({umlaut over (r)})}. Theaccelerometer-gyroscope readings can be processed in an IMU-fusionfilter to separate between gravitational acceleration and linearacceleration. The computed linear acceleration can then be fed into theKalman filter as measurements for {right arrow over ({umlaut over (r)})}when correcting, the state vector, while the gyroscope readings canserve as measurements for {right arrow over (ω)}. The extraaccelerometer-gyroscope readings may significantly reduce the filter'slatency and provide even higher-rate, more stable localization.

In another configuration, for example instead of separating between“classical” IMU-fusion orientation tracking and magnetometer-based 6DOFtracking, additional IMU data (accelerometer, gyroscope) can be combinedwith magnetometer readings in a single unified extended Kalman filter.The states of this filter may be: M₀, B₀, {right arrow over (r)}, Q,{right arrow over ({dot over (r)})}, {right arrow over (ω)}, {rightarrow over ({umlaut over (r)})} (as explained above). This unifiedfilter may use a constant (or damped) acceleration model for itsposition. Each sensor 31 (magnetometer, optional accelerometer &gyroscope) may contribute a measurement for the “update” step, in whichall measurements need to be explained using the filter's states. Forexample, magnetic measurements may be explained with M_(RX) ^((DUAL))using M₀, B₀, {right arrow over (r)}, Q, accelerometer measurements(which are a superposition between gravitational acceleration and linearacceleration) may be expressed by combining Q, {right arrow over({umlaut over (r)})} and gyroscope measurements can be explaineddirectly by a {right arrow over (ω)}.

Using an extended Kalman filter for solving for 6DOF localization ofsensors 31 and/or tube 36 can be easily generalized for any type oftransmitter 20, not limited to the transmitter 20 described withreference to FIG. 2 . As long as each magnetic measurement can beexplained using the states of the filter, the filter may be fullyfunctional and provide fast 6DOF solutions. This is an excellentproperty of the extended. Kalman filter, where all is needed forhigh-quality solutions of the states is to be able to model themeasurements using those states.

For example, in case of using an electromagnetic generator transmitter20 that generates magnetic field by electromagnetic coils, M_(RX)^((DUAL))(t) may be replaced with the more general formula:

M _(RX)(t)=M ₀ +R ^(t)(t)B ₀ +R ^(t)(t)M({right arrow over (r)},t)

Where M({right arrow over (r)},t) depends on the magnetic fieldgenerated by the transmitter 20 being used. This makes the use of anextended Kalman filter for a 6DOF localization solution of sensors31/tube 36 invariant to the choice of transmitter, which is extremelypowerful and flexible for many general purposes.

According to some embodiments of the present disclosure, server 10 mayuse in its catheter localization algorithm known structuralrelationships between sensors 31 to calculate an estimation of theposition, orientation and/or curve of tube 36 as a whole, for examplerather than calculating position and/or orientation for each of sensors31 separately.

Reference is now made to FIG. 4 , which is a schematic illustration ofcatheter 30, according to some embodiments of the present disclosure.Catheter 30 may include a flexible PCB 33 within and/or placed alongcatheter tube 36. PCB 33 may be communicationally connected tomicrocontroller 32, for example by the same data bus 34 that may includefew wire lines 35, for example two to four wires 35. For example,inter-integrated circuit (I2C) is used as a digital connection interfacebetween microcontroller 32 and sensors 31 installed along PCB 33. Insome embodiments, it only requires two wires 35 for exchange of databetween the sensors and microcontroller 32, which may be beneficial fora small catheter where wire count should be kept small.

in exemplary configurations, flexible PCB 33 may have eight, five, ten,or any suitable number of sensors 31 installed thereon, for example allconnected to the same I2C bus (for example serial data and serial clocklines). In some embodiments, microcontroller 32 is connected to flexiblePCB 33 using a 4-wires shielded cable, for example including voltageand/or ground wires. Microcontroller 32 may provide the voltage and/orground for digital sensors 31, for example additionally to two datalines for the readings of digital measurements by sensors 31.Microcontroller 32 may read sensors 31, for example, sequentially andsend the sensor readings to server 10, for example over wired and/orwireless communication. In a slightly different configuration, fivewires 35 may be used to connect between microcontroller 32 and flexiblePCB 33 and/or sensors 31. For example, additional data line(s) may beadded. For example, some of sensors 31 may use a first data line wire,and other sensors 31 may use a second data line wire. Accordingly, forexample, microcontroller 32 may sample and/or read some of sensors 31,simultaneously, thus, for example, reducing the overall I2C samplingtime. For example, in case of two parallel data line wires, the samplingtime may be reduced by half.

The design of flexible PCB 33 and/or positioning of sensors 31 thereonmay provide the positions and/or orientations of sensors 31, forexample, when PCB 33 is straight. For example, during the manufacturingprocess, PCB 33, may be attached inside and/or along tube 36, forexample in a manner that determines the positions and/or orientations ofsensors 31, for example, with respect to tube 36. Server 10 may becalibrated to provide to server 10 the initial 6DOF orientation and/orposition of sensor 31, for example 6DOF orientation and/or position ofsensor 31 when tube 36 is straight. The initial 6DOF orientation and/orposition data, along with information about rigidity and/or flexibilitylimitations of tube 36, may be incorporated in the catheter localizationalgorithm as shape constraints. For example, based on incorporated shapeconstraints, two neighboring sensors 31 cannot point to oppositedirections.

This way, a more sophisticated localization algorithm, which takes shapeconstraints into account, can enable system 100 to be both compact androbust. Solving for the 6DOF position and/or orientation of all sensors31 while imposing physical shape constraints on catheter tube 36full-curve shape may essentially reduce the number of parameters of themotion model and thus, for example, may prevent over-fitting of themeasured data. By using the shape constraints, server 10 may refrainfrom erroneously calculating a position and/or orientation of sensor 31due to a noisy or distorted measurement, because the position and/ororientation solution must comply, for example, with position and/ororientation solutions of neighboring sensors 31, for example so theywould together describe a smooth, physically plausible catheter tube 36.

A common challenge in electromagnetic localization systems is to be asaccurate as possible in the presence of magnetic distortion. For lowfrequency systems, the main distorters are objects made of ferromagneticmaterials. In the hospital settings, these may be found in the frame ofthe patient's bed, or as part of the instruments used by physicians(e.g. surgical tools) during a medical procedure. When a localizationsystem does not take magnetic distortion into account, it may beextremely inaccurate (position errors>1 cm) and may be unfit, formedical use. Magnetic distorters can be divided to static distorterswhose position relative to the system can be fixed, and dynamicdistorters which can move between medical procedures and/or during aprocedure. Static magnetic distorters are objects that can be fixedrelative to the magnetic field generator during the deployment of alocalization system, and will stay permanently fixed during the lifetimeuse of the localization system.

In some embodiments of the present disclosure, static distortion can beaddressed by a process of magnetic mapping, where the magnetic fields inthe sensing radius around transmitter(s) 20 are no longer assumed to beperfect dipole fields, but are rather “mapped” in an offline processwith calibrated sensors 31 and are later used by the real-time solver inorder to solve for accurate 6DOF position and orientation even under thedistorted fields. In some embodiments, server 10 may take into accountdynamic distortion by incorporating the distortion in the localizationalgorithm, for example in order to provide accurate solutions

Different methods can be used to compensate for dynamic magneticdistortions. One method would be to incorporate physical distortionmodel inside the model of the sensed magnetic field of sensor 31. Thisaddition of parameters may yield less robust solutions if each sensor 31is solved independently, due to the solver's ability to over-fit the6DOF and distortion model parameters to the measured sensor 31 data,even in case of more than one transmitter 20. For this reason, thesolver should be constrained to parameters that make “mechanical sense”,both in terms of the solved geometry of the sensors 31 in the cathetertube 36 and the geometrical properties of the distortion field. Anotherway of addressing dynamic distortion may include imposing shapeconstraints on catheter tube 36 full-curve shape. The 6DOF orientationand position solution calculated by server 10 may not deviate much fromthe actual position and orientation of sensor 31 along the curve of tube36, for example because they are regularized by shape constraints, asdescribed above. While dynamic distortion is usually a local artifactthat deforms position and orientation calculations quite differently,the imposed shape constraints will make sure that the multiple sensor 31position and/or orientation solutions would still make sense in terms ofthe catheter tube 36 fully solved curve. The undesirable effect ofdistortion will then be naturally reduced just due to the imposed shapeconstraints.

There are several methods for imposing shape constraints in thelocalization algorithm. One option would be to approximate thecatheter's shape as a set of line segments 37, with a single sensor 31at the end of each segment 37. The orientation of each sensor 31 withrespect to its surrounding catheter and its distance to its adjacentreceivers are assumed to be fixed and known, for example by calibrationof the localization algorithm. Hence, according to some embodiments ofthe present disclosure, the entire catheter curve can be modeled by asingle set of 6DOF that may belong to the one of the sensors 31, forexample a first sensor 31 along tube 36, for example the closest in thecommunication path to server 10 and/or to microcontroller 32, and foreach sensor 31 two spherical angles which correspond to the bend of thecatheter in segment 37 between the sensor 31 and a preceding, forexample neighboring, sensor 31, and/or an additional angle to representthe internal twist of tube 36 in the corresponding line segment 37. Insome embodiments of the present invention, PCB 33 includes thinnerportions 33 a, for example in between sensors 31, that are thinner, forexample, from portions of PCB 33 where sensors 31 are located, forexample in order to facilitate enhances flexibility and/or bendabilityof PCB 33 in portions 33 a.

Reference is now made to FIG. 5 , which is a schematic illustration of acatheter 30 a, according to some embodiments of the present disclosure.In some embodiments, flexible PCB 33 is wrapped in a helix manner onand/or along an inner or outer wall of tube 36, as shown in FIG. 5 , forexample in order to facilitate enhances flexibility and/or bendabilityof catheter 30 a, e.g. of tube 36 together with PCB 33. As described inmore detail herein, for example with reference to FIG. 6 , PCB 33 maycarry, for example further to sensors 31 and/or data bus 34, a pluralityof dipole magnets.

Accordingly, in some embodiments, the number of parameters in thecatheter's shape is significantly reduced from 6DOF orientation andposition for each sensor 31 to 6DOF orientation and position for a firstsensor 31 plus three angles for each additional sensor 31. In thismethod, the solved orientation and position of sensors 31 are less proneto over-fitting, for example due to hard constraints which assume afixed distance between sensors 31, and, for example a fixed orientationof each sensor 31 with respect to a certain surrounding segment of tube36. An alternative is to use a soft model, in which the position andorientation of sensor 31 with respect to a previous, for exampleneighboring, sensor 31, are parameterized with regularization terms topenalize the parameters, for example:

E _(dist)=(∥r _(i+1) −r _(i) ∥−D _(i) ^((cal)))²

Where: r_(i),r_(i+1)—positions of two sequential sensors 31,respectively, and D_(i) ^((cal))—the calibrated distances between thetwo sequential sensors 31. Alternatively, an inequality can be used toconstrain the solved distance to a certain range, e.g.: 0.9 D_(i)^((cal))≤∥r_(i+1)−r_(i)∥≤1.1 D_(i) ^((cal)). Such a model, which takesthe parameters of sensors 31 into account, can be formalized in a singleExtended Kalman Filter,

Another possible method is to solve orientation and/or position forsensor 31, for example with an independent solver, may include fittingof a mechanical model to the curve of catheter tube 36 in segments 37between sensors 31, and then force an individual sensor 31 to lie asclose as possible to its relevant position and orientation along thecurve of tube 36. This could be accomplished, for example, by fitting alow degree polynomial between solved positions of sensors 31, and thenuse the model's positions of sensors 31 as (noisy) position measurementsto the independent solvers. Another more general way to achieve this isby describing the curve of tube 36 as a general curve with some energyfunction, which may encode the catheter's shape constraints (forexample, position and orientation smoothness constraints, distance alongthe curve between sequential sensors etc.). The curve of tube 36 canthen be fitted to the noisy or distorted measurements of sensors 31 bymeans of non-linear optimization, minimizing errors of sensors 31 andthe energy function of the curve of tube 36, simultaneously. The methodof alternating between individual sensor 31 localization computationsand full-curve fitting computations may be beneficial, because it mayallow the computations to be executed in parallel. Instead of solvingthe full-curve shape of tube 36 as a whole inside a potentially giganticExtended Kalman filter, the task may be broken into smaller subtasks,such as solving localization of each sensor 31 individually, and thesub-results may then be glued together in the form of the finalcatheter's curve fitting.

In some embodiments, it is further possible to reduce the system'snumber of degrees of freedom by assuming that the environmental magneticfield (e.g. Earth's magnetic field) is uniform along the curve of thecatheter. The solved environmental magnetic field is denoted above by B₀and is solved for each sensor of the catheter independently (intransmitter's coordinate system). By assuming that the environmentalmagnetic field is uniform along the catheter, B₀ can be jointly solvedfor all sensors of the catheter, thus reducing the degrees of freedom ofthe system and decreasing the risk of over-fitting. Intuitively, sharingB₀ between sensors imposes constraints on the relative orientationsbetween sensors (which together with full catheter shape-constraints,also imposes constraints on the relative positions of the sensors).Assuming that B₀ is uniform along the entire catheter might not becorrect in cases where magnetic distortion is present; in these casesthe environmental magnetic field deforms and may vary slowly in space,and in particular along the catheter curve. In this case, a softerassumption may be utilized, assuming that B₀ is almost constant betweenneighboring sensors. This soft assumption can be expressed as an energyfunction and minimized in least squares sense (as part of the fullcatheter solver optimization): E_(env)=Σ_(i)∥B₀ ^(i)−B₀ ^(i+1)∥², itrequires the solved environmental magnetic fields of neighboring sensors(B₀ ^(i), B₀ ^(i+1)) to be similar to each other. In all cases mentionedabove, the solved B₀ are no longer independent per-sensor, but rathertied together in order to pose some constraints on the in-betweenorientation of the sensors along the catheter.

In another embodiment, instead of just using the natural environmentalmagnetic field (e.g. Earth's) for imposing constraints on the solved6DOF of the sensors, artificial constant magnetic fields can be createdby incorporating small magnets along the catheter's curve. With themagnets placed at known positions and directions, B₀ can be fullypredicted for any given configuration of the full catheter curve. B₀ mayalso depend on the relative positions and orientations of the sensors(which by shape smoothness constraints also uniquely define the relativepositions and orientations of the incorporated magnets), since each suchdifferent configuration can potentially cast other DC magnetic fields(e.g. magnetic fields with substantially zero frequency) on each sensoralong the curve by the differently positioned and oriented incorporatedsmall magnets. By knowing the exact position and orientation of eachincorporated magnet for each full curve configuration, B₀ of each sensorcan be predicted so that system's number of degrees of freedom mayfurther decrease.

Reference is now made to FIG. 6 , which is a schematic illustration of acatheter 30 b, according to some embodiments of the present disclosure.Catheter 30 a may include a plurality of dipole magnets 38 which arepositioned between the sensors, for example in equal distances. Forexample, dipole magnets 38 are oriented so that two magnets 38 locatedat two sides of a sensor 31 have opposite dipole directions, when tube36 is in a straight state, When catheter tube 36 is straight, eachsensor may sense the superposition of perfectly aligned positive andnegative dipole fields so the contribution of two magnets located at twosides of sensor 31 may be canceled, and thus, for example, the B₀ sensedby sensor 31 may substantially include only Earth's magnetic field. Whenthe catheter starts to bend the contribution of two magnets located attwo sides of sensor 31 may grow linearly as C sin(α), wherein α is theangle of bend and C is some known constant depending on the relativepositions and strength of magnets 38. In this example, it is evident howB₀ encodes more information about the relative orientations betweenneighboring sensors. By incorporating magnets 38 along the catheter, asin this example, more efficient constraints may be achieved on therelative sensor orientations than in the case of just using Earth'smagnetic field, in terms of SNR (by incorporating relatively strongmagnets), reliability (the incorporated magnets are much less prone tomagnetic distortion) and geometry (posing the magnets in carefullychosen orientations tunes the constraints as desired for a specificapplication).

In some embodiments of the present invention, system 100 may be used fororgan deformation tracking in minimally invasive surgery. For example, afull-curve catheter localization is used in order to track thedeformation which is applied to an internal organ by some externalmeans. For example, during a laparoscopic procedure, organs may bemanipulated using tools to the extent where it is hard to tell whichpart of the organ is visible in the live laparoscopic video. For thatreason, visual markers are sometimes utilized: at the beginning of theprocedure, and before applying any manipulation to the organ, markersare placed on th surface of the organ at known anatomical landmarks.They are then visually tracked throughout the procedure and used asregistration fiducials in order to enable some sort of anatomicallocalization, even though the organ may be highly manipulated anddeformed compared to its initial known state.

Unfortunately, in some procedures such as lung laparoscopy, wherelocalization is critical for identifying hidden blood vessels, thesurface of the lungs does not contain enough visual information forplacing anatomical markers (i.e., markers whose positions in the anatomyare well known). Furthermore, due to the lung's highly flexible form,tracking anatomical features on the surface of the lung does notnecessarily extend well for the tracking of important anatomicalfeatures inside the lung, such as airways and blood-vessels; the surfacedoes not necessarily predicts well the internal state of the lung.Finally, visual markers and optical tracking systems are prone toocclusions, motion blur, three-dimensional from two-dimensionalcomputational problems and other ills which make most optical-basedsystems unfit for the purpose of highly accurate laparoscopic guidance.

The newly invented full-curve flex catheter tracking can address theflexible registration problem quite easily: In a preoperative stage, oneor more Ilex-track catheters are inserted into known airways using abronchoscope. Each catheter stays stationary relative to anatomy (asdescribed below) and provides full-curve localization for an airwaywhich is close to some region of interest (ROI). All importantanatomical features in some ROI can then be displayed in real-time byemploying real-time registration between the fully tracked catheter anda preoperative CT scan. During the laparoscopic procedure, the catheter(or multiple catheters) is bent and twisted, but still holds itsanatomical position inside some known airway. The catheter (or multiplecatheters) can then serve as a skeleton for the lung, which is fullytracked in real-time, and can provide for a smooth, real-time flexibleregistration between important anatomical features taken frompreoperative CT and the real-time deformed lung. By placing anadditional sensor on the laparoscopic camera, those anatomical featurescan be displayed as an overlay on the live laparoscopic video, thusprovide guidance for laparoscopic procedures in the lungs, which isfully real-time and flexible by its nature.

In order for the catheter to hold still relative to the anatomy,specifically in organs containing tubes (blood vessels or airways), itshould be attached to the anatomical tube. Attachment should be made atthe distal allowing the catheter to track organ from the distal point ofthe catheter and allowing the organ to stretch or shrink freely.Attachment can be achieved using a balloon or hooks, or by friction withthe tissue. In order for the catheter to comply with anatomy withoutdeforming it the catheter needs to be highly flexible. Flexibility isachieved by using flexible plastic tubing in the construction of thecatheter shaft. It is also important to reduce the rigidity of theflexible PCB. The rigidity of the flexible PCB material is derived fromthe polyimide stiffness, the number of PCB layers and amount of copperused. The increase in flexibility can be achieved by PCB geometricaldesign, for example by reducing the width of PCB 33 between sensors 31,and/or routing the conductors in tortuous way and cutting PCB 33parallel to the tortuous path to reduce rotational rigidity.

In some embodiments of the present invention, system 100 may be used forelectromagnetic navigation bronchoscopy (ENB). A full-curve real-timelocalized catheter has great advantages in terms of registrationaccuracies within an ENB procedure. Instead of relying on past samplesof the catheter's tip alone, which are very “noisy” due to breathing andheart movement, the full catheter is always visible in the system andcan be used as a whole for registration between the coordinates oftransmitter 20 and the airways map. The catheter's very specific bendand shape inside the airways may teach the system about the mostprobable location of the catheter, as a full curve, inside the airways.Its shape can be matched to the map and be used as a unique signaturefor its anatomical location inside the airways. For initialregistration, the full-curve localization provides many more samplesduring an unsupervised survey in the lungs compared to just thecatheter's tip—full paths may be drawn in coordinates of transmitter 20and can be matched to the map in an. unsupervised fashion, thusimproving the registration's stability and accuracy. For adaptiveregistration, the fully localized catheter's curve can be matched intoairways inside some region of interest (ROI) until the most probableairway is found. This accommodates better for breathing and changes inbody posture; the full-curve localization is immediate, unlikehistory-based approaches in which the accumulated samples inside thetime window may undergo different deformation over time (for example, ifthey were taken during different phases of breathing). Another form ofadaptive registration is also possible, where the full-curvelocalization can be used as a skeletonization of the lungs and serve asthe basic ingredient for a flexible deformable lung model. By analyzingthe full curve of the catheter one may understand how certain majorairways, through which the catheter passes, are deformed, then concludehow surrounding areas are deformed by using some extrapolation model.

Furthermore, catheter steering may become easier: it's not uncommon fora physician to experience difficulties while trying to perform a sharpturn with a catheter inside the lungs. The physician would then try overand over again to pull, rotate and push the catheter based on thesingle-sensor feedback which they receive from the system. With afull-curve localization the physician can see the full bend of thecatheter and have a better understanding of how the applied forcestranslate into distal catheter movement under the stress of thesurrounding tissues. Based on this much more informative feedback, hecan then generate more precise steering gestures which would translateinto the exact desired distal motion with much less trial and error.

In addition, full-curve localization is much easier to register withother modalities such as fluoroscopy. During fluoroscopy the full lengthof the catheter is visible in the X-ray image due to the radio-opacityof the catheter. In traditional EM localization systems only the tip isvisible. In such situation, it would be difficult for a physician tomatch between the fluoroscopic image and the image displayed by thelocalization system. With full catheter localization both the catheter'sfull length is visible both in the fluoroscopic image as well as themagnetic localization system, which makes it much easier for a physicianto match between the different modalities.

in some embodiments of the present disclosure, system 100 may be usedfor electromagnetic guided colonoscopy where full catheter localizationproves to be beneficial.

It will be appreciated that some embodiments of the present inventionare applicable to any elongated flexible body and not only to acatheter, with the required changes.

Some embodiments of the present disclosure may include a system, amethod, and/or a computer program product. The computer program productmay include a tangible non-transitory computer readable storage medium(or media) having computer readable program instructions thereon forcausing a processor to carry out aspects of the present disclosure.Computer readable program instructions for carrying out operations ofthe present disclosure may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including anyobject-oriented programming language and/or conventional proceduralprogramming languages.

In the context of some embodiments of the present disclosure, by way ofexample and without limiting, terms such as ‘operating’ or ‘executing’imply also capabilities, such as ‘operable’ or ‘executable’,respectively.

Conjugated terms such as, by way of example, ‘a thing property’ impliesa property of the thing, unless otherwise clearly evident from thecontext thereof.

The term is ‘processor’ or ‘computer’, or system thereof, are usedherein as ordinary context of the art, such as a general purposeprocessor, or a portable device such as a smart phone or a tabletcomputer, or a micro-processor, or a RISC processor, or a DSP, possibly,comprising additional elements such as memory or communication ports.Optionally or additionally, the terms ‘processor’ or ‘computer’ orderivatives thereof denote an apparatus that is capable of carrying outa provided or an incorporated program and/or is capable of controllingand/or accessing data storage apparatus and/or other apparatus such asinput and output ports. The terms ‘processor’ or ‘computer’ denote alsoa plurality of processors or computers connected, and/or linked and/orotherwise communicating, possibly sharing one or more other resourcessuch as a memory.

The terms ‘software’, ‘program’, ‘software procedure’ or ‘procedure’ or‘software code’ or ‘code’ or ‘application’ may be used interchangeablyaccording to the context thereof, and denote one or more instructions ordirectives or electronic circuit for performing a sequence of operationsthat generally represent an algorithm and/or other process or method.The program is stored in or on a medium such as RAM, ROM, or disk, orembedded in a circuitry accessible and executable by an apparatus suchas a processor or other circuitry. The processor and program mayconstitute the same apparatus, at least partially, such as an array ofelectronic gates, such as FPGA or ASIC, designed to perform a programmedsequence of operations, optionally comprising or linked with a processoror other circuitry.

The term ‘configuring’ and/or ‘adapting’ for an objective, or avariation thereof, implies using at least a software and/or electroniccircuit and/or auxiliary apparatus designed and/or implemented and/oroperable or operative to achieve the objective.

A device storing and/or comprising a program and/or data constitutes anarticle of manufacture. Unless otherwise specified, the program and/ordata are stored in or on a non-transitory medium.

In case electrical or electronic equipment is disclosed it is assumedthat an appropriate power supply is used for the operation thereof.

The flowchart and block diagrams illustrate architecture, functionalityor an operation of possible implementations of systems, methods andcomputer program products according to various embodiments of thepresent disclosed subject matter. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof program code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, illustrated or describedoperations may occur in a different order or in combination or asconcurrent operations instead of sequential operations to achieve thesame or equivalent effect.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. As usedherein, the singular forms “a”, “an” and “the” are intended to includethe plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprising”,“including” and/or “having” and other conjugations of these terms, whenused in this specification, specify the presence of stated features,integers, steps, operations, elements, and/or components, but do notpreclude the presence or addition of one or more other features,integers, steps, operations, elements, components, and/or groupsthereof.

The terminology used herein should not be understood as limiting, unlessotherwise specified, and is for the purpose of describing particularembodiments only and is not intended to be limiting of the disclosedsubject matter. While certain embodiments of the disclosed subjectmatter have been illustrated and described, it will be clear that thedisclosure is not limited to the embodiments described herein. Numerousmodifications, changes, variations, substitutions and equivalents arenot precluded.

What is claimed is:
 1. A method for magnetic tracking of a flexibledevice, which is a flexible catheter device or another flexibleelongated device, said flexible device comprising an elongated flexiblebody, the method comprising: a receiving by a host server a plurality ofsensed values of a local magnetic field, sensed by a respectiveplurality of digital magnetometers, the digital magnetometers arelocated at corresponding multiple locations along the elongated flexiblebody of said flexible device, wherein the sensed values are at leastpartially due to at least one alternating magnetic field generated by atleast one magnetic field generator; and b. calculating by the hostserver, based on the sensed magnetic field values and source amplitudeand frequency of each generated magnetic field, an estimation of a curvelocalization of said elongated flexible body; wherein said calculatingcomprises: incorporating the sensed magnetic field values and sourcevalues of each generated magnetic field in a localization algorithm;incorporating shape constraints of the elongated flexible body of saidflexible device in the localization algorithm; and performing curveoptimization based on the incorporated values and said incorporatedshape constraints, to determine said estimation of said curvelocalization of said elongated flexible body.
 2. The method according toclaim 1, wherein the flexible device comprises a tip, and wherein thedigital magnetometers are located along said flexible device, on atleast one of said tip and said body of said flexible device.
 3. Themethod according to claim 1, wherein the localization algorithmcomprises an energy function of the curve of the elongated flexible bodyand errors of the magnetometers, and wherein said curve optimizationcomprises minimization of said energy function.
 4. The method accordingto claim 1, wherein the host server is calibrated with initialorientations and positions of the plurality of digital magnetometers. 5.The method according to claim 1, wherein the shape constraints includeinformation about rigidity and/or flexibility limitations of theelongated flexible body.
 6. The method according to claim 1, wherein theshape constraints include known structural relationships between thepositions and orientations of the digital magnetometers along theelongated flexible body of said flexible device.
 7. The method accordingto claim 1, wherein the shape constraints include approximation of theshape of the elongated flexible body as a set of line segments, eachline segment connecting between two of the plurality of digitalmagnetometers.
 8. The method according to claim 1, wherein the shapeconstraints include fixed and known orientations and distances of eachmagnetometer relative to its adjacent magnetometers.
 9. The methodaccording to claim 1, wherein the shape constraints further includesmoothness constraints of the shape of the elongated flexible body. 10.The method according to claim 1, wherein the localization algorithmdescribes the curve of the elongated flexible body with an energyfunction that encodes the shape constraints of the elongated flexiblebody.
 11. The method according to claim 1, wherein the host server isconfigured to fit the curve to measurements of the magnetometers, byminimizing errors of the measurements and of the curve.
 12. The methodaccording to claim 1, wherein said digital magnetometers are digital DCmagnetometers.
 13. The method according to claim 1, wherein a pluralityof said digital magnetometers are located on a same digitalcommunication bus.
 14. The method according to claim 1, wherein saidcalculating comprises incorporating physical distortion model in thelocalization algorithm, to compensate for dynamic magnetic distortions.15. A system for magnetic tracking of a flexible device, which is aflexible catheter device or another flexible elongated device, thesystem comprising: a at least one generator, each configured to generateat least one alternating magnetic field; b. a flexible devicecomprising: i. an elongated flexible body; ii. a plurality of digitalmagnetometers, the digital magnetometers are located at correspondingmultiple locations along the elongated flexible body of said flexibledevice, each configured to communicate sensed values of a local magneticfield, wherein the sensed values are at least partially due to thegenerated magnetic field; and c. a host server configured to: iii.receive the sensed local magnetic field values from the correspondingdigital magnetometers; and iv. calculate, based on the sensed magneticfield values and source amplitude and frequency of each generatedmagnetic field, an estimation of a curve localization of said elongatedflexible body; wherein said calculate comprises: incorporating thesensed magnetic field values and source values of each generatedmagnetic field in a localization algorithm; incorporating shapeconstraints of the elongated flexible body of said flexible device inthe localization algorithm; and performing curve optimization based onthe incorporated values and said incorporated shape constraints, todetermine said estimation of said curve localization of said elongatedflexible body.
 16. The system according to claim 15, wherein theflexible device comprises a tip, and wherein the digital magnetometersare located along said flexible device, on at least one of said tip andsaid body of said flexible device.
 17. The system according to claim 15,wherein the localization algorithm comprises an energy function of thecurve of the elongated flexible body and errors of the magnetometers,and wherein said curve optimization comprises minimization of saidenergy function.
 18. The system according to claim 15, wherein thedevice further comprises a flexible PCB along the flexible device,wherein the digital magnetometers are located along the flexible PCB.19. The system according to claim 18, wherein the flexible PCB iswrapped in a helix manner on a wall of the flexible device.
 20. Thesystem according to claim 15, wherein the device further comprises acommunication bus configured to carry the sensed values data digitallyfrom the plurality of digital magnetometers towards the server.
 21. Thesystem according to claim 20, wherein the communication bus includes upto four wire lines that may carry the sensed values digital data fromand provide power to the plurality of digital magnetometers.
 22. Thesystem according to claim 15, wherein a plurality of the magnetometersare installed on a same flexible printed circuit.
 23. The systemaccording to claim 22, wherein the flexible printed circuit includesthinner portions between the digital magnetometers.
 24. The systemaccording to claim 15, wherein a plurality of said digital magnetometersare located on a same digital communication bus.
 25. The systemaccording to claim 15, wherein the at least one generator comprises oneor more transmitting coils which generate EM fields of differentgeometry.
 26. The system according to claim 15, wherein said digitalmagnetometers are digital DC magnetometers.